package com.huangqi;

import com.huangqi.irs.IrsApiGateway;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        System.out.println("##########  irs接口调用测试：  ##########");
        System.out.println("请输入接口账号accessKey：");
        String accessKey = scanner.nextLine();
        System.out.println("请输入接口账号secretKey：");
        String secretKey = scanner.nextLine();
        System.out.println("请输入接口地址：");
        String dataApiUrl = scanner.nextLine();
        System.out.println("请输入入参JSON字符串：");
        String body = scanner.nextLine();

        System.out.println("执行测试中，请稍后...");
        try {
            String result = IrsApiGateway.singleTest(accessKey, secretKey, dataApiUrl, body);
            System.out.println("接口返回结果：");
            System.out.println(result);
        } catch (Exception e) {
            System.out.print("接口调用过程中发生错误：" + e.getMessage());
        }
    }
}